#ifndef _UVM_PRIVATE_
#define _UVM_PRIVATE_

#include "uvm_public.h"
#include "uv.h"

#if defined(_WIN32) || defined(WIN32)
#define LINE_SEPARATOR "\r\n"
#elif defined(__APPLE__)
#define LINE_SEPARATOR "\r"
#else
#define LINE_SEPARATOR "\n"
#endif

typedef struct s_async_req {
    uvm_async_cb cb;
    void *data;
    struct s_async_req *next;
} async_req_t;

typedef struct s_uvm_impl {
    void *data;

    int          inneruv;
    uv_loop_t   *uv;
    uv_async_t   async;
    uv_mutex_t   mutex;
    async_req_t *async_req_head;
    async_req_t *async_req_tail;
} uvm_impl_t;

extern int net_is_ip(const char* input);

#endif